<template>
  <div class="dashboard-container">
    <!-- <div class="dashboard-text">name: {{ name }}</div> -->
    <!-- 头部 -->
    <el-row :gutter="10">
      <el-col :span="6">
        <el-card>
          <Card>
            <template slot="charts">
              <span>
                周同比 56.67%
                <i class="el-icon-top"></i> 日同比 19.96
                <i class="el-icon-bottom"></i>
              </span>
            </template>
            <template slot="footer">日销售额￥1928</template>
          </Card>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card>
          <Card>
            <template slot="charts">
              <LineCharts></LineCharts>
            </template>
            <template slot="footer">日销售额￥1928</template>
          </Card>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card>
          <Card>
            <template slot="charts">
              <BarCharts></BarCharts>
            </template>
            <template slot="footer">日销售额￥1928</template>
          </Card>
        </el-card>
      </el-col>
      <el-col :span="6">
        <el-card>
          <Card>
            <template slot="charts">
              <ProgressCharts></ProgressCharts>
            </template>
            <template slot="footer">日销售额￥1928</template>
          </Card>
        </el-card>
      </el-col>
    </el-row>
    <!-- 内容部分
      :default-active="activeIndex" mode="horizontal" @select="menuSelect"
    -->
    <div style="margin:10px 0;">
      <Cont></Cont>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import Card from "./Card";
import LineCharts from "./Card/lineCharts";
import BarCharts from "./Card/barCharts";
import ProgressCharts from "./Card/progressCharts";
// 中间内容部分
import Cont from './cont/index.vue';
export default {
  name: "Dashboard",
  components: { Card, LineCharts, BarCharts, ProgressCharts,Cont },
  computed: {
    ...mapGetters(["name"])
  },
  mounted(){
    this.$store.dispatch('getData');
  }
  
};
</script>

<style lang="scss" scoped>
.dashboard {
  // &-container {
  //   margin: 30px;
  // }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
.el-icon-top {
  color: green;
}
.el-icon-bottom {
  color: red;
}
.header {
  display: flex;
  justify-content: space-between;
  border: 1px solid red;
}
</style>
